//
//  YZNetworkManager+YZMSpread.m
//  YZMicroStock
//
//  Created by apple on 17/1/9.
//  Copyright © 2017年 cqjr. All rights reserved.
//

#import "YZClient+YZMSpread.h"

@implementation YZNetworkManager (YZMSpread)

-(void)getinforAboutUserSpreadsuccess:(void (^)(NSURLSessionDataTask *, id))success failure:(void (^)(NSError *))failure{
    NSDictionary *param = @{COMMON_REQUEST_DEVICE:COMMON_REQUEST_DEVICE_VALUE};
    [self.mainNetwork cq_noCachePOST:URL_FOR_GET_INFOR_ABOUT_USERSPREAD parameters:param
                             success:^(NSURLSessionDataTask *task, id responseObject) {
                                 if (success) {
                                     success(task, responseObject);
                                 }
                             } failure:^(NSURLSessionDataTask *task, NSError *error) {
                                 if (failure) {
                                     failure(error);
                                 }
                             }];
}

- (void)fetchSpreadUserListWithPage:(NSInteger)page andPageSize:(NSInteger)pageSize success:(void (^)(NSURLResponse *response, id responseObject))success failure:(void (^)(NSError *error))failure{
    
    NSDictionary *params = @{@"page":@(page), @"pageSize":@(pageSize),COMMON_REQUEST_DEVICE:COMMON_REQUEST_DEVICE_VALUE};
    
    [self.mainNetwork cq_noCachePOST: URL_FOR_GET_LIST_ABOUT_SPREAD_MYUSER parameters: params
                             success:^(NSURLSessionDataTask *task, id responseObject) {
                                 if (success) {
                                     success(task.response, responseObject);
                                 }
                             } failure:^(NSURLSessionDataTask *task, NSError *error) {
                                 if (failure) {
                                     failure(error);
                                 }
                             }];
}


@end
